import request from '@/utils/request'

// 查询实体工程信息表列表
export function listGongcheng(query) {
  return request({
    url: '/system/gongcheng/list',
    method: 'get',
    params: query
  })
}

export function getTemplate() {
  return request({
    url: '/system/gongcheng/getTemplate/',
    method: 'get',
    responseType:'arraybuffer'
  })
}

// 查询实体工程信息表列表
export function noMergerListGongcheng(query) {
  return request({
    url: '/system/gongcheng/noMergerList',
    method: 'get',
    params: query
  })
}

// 查询实体工程信息表详细
export function getGongcheng(id) {
  return request({
    url: '/system/gongcheng/' + id,
    method: 'get'
  })
}

// 新增实体工程信息表
export function addGongcheng(data) {
  return request({
    url: '/system/gongcheng',
    method: 'post',
    data: data
  })
}

// 修改实体工程信息表
export function updateGongcheng(data) {
  return request({
    url: '/system/gongcheng',
    method: 'put',
    data: data
  })
}

// 删除实体工程信息表
export function delGongcheng(id) {
  return request({
    url: '/system/gongcheng/' + id,
    method: 'delete'
  })
}

// 查询根据根据年度获得统计
export function getNianDuTongJi() {
  return request({
    url: '/system/gongcheng/getNianDuTongJi',
    method: 'get'
  })
}

// 查询根据分类获得统计
export function getFenLeiTongJi() {
  return request({
    url: '/system/gongcheng/getFenLeiTongJi',
    method: 'get'
  })
}

// 绑定实体档案
export function bindShitiByDianzi(eeid, gid) {
  return request({
    url: '/system/gongcheng/bindShitiByDianzi/'+ eeid + '/' + gid,
    method: 'post'
  })
}
// 解绑实体档案+旧实体案卷
export function cancelEngBind(eeid, bindType) {
  return request({
    url: '/system/gongcheng/cancelEngBind/'+ eeid + '/' + bindType,
    method: 'post'
  })
}

// 绑定实体旧案卷档案
export function bindNewDzOldAnjuan(eeid, bindAnJuanIdes) {
  return request({
    url: '/system/gongcheng/bindNewDzOldAnjuan/'+ eeid + '/' + bindAnJuanIdes,
    method: 'post'
  })
}



